package net.daoke.relation.enums;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 枚举类，定义了网络协议的类型和描述。
 */
@Schema(description = "枚举类，定义了网络协议的类型和描述")
@Getter
@AllArgsConstructor
public enum ProtocolEnum {
    // 物理连接关系
    WIRED_CONNECTION("WIRED_CONNECTION", "有线连接"),
    WIRELESS_CONNECTION("WIRELESS_CONNECTION", "无线连接"),
    // 数据链路层关系
    MAC_ADDRESS_CONNECTION("MAC_ADDRESS_CONNECTION", "MAC地址连接"),
    SWITCH_CONNECTION("SWITCH_CONNECTION", "交换机连接"),
    PPP_CONNECTION("PPP_CONNECTION", "Point-to-Point连接"),
    FRAME_RELAY_CONNECTION("FRAME_RELAY_CONNECTION", "Frame-Relay连接"),
    // 网络层关系
    IP_ADDRESS_CONNECTION("IP_ADDRESS_CONNECTION", "IP地址连接"),
    ROUTER_CONNECTION("ROUTER_CONNECTION", "路由连接"),
    ICMP_CONNECTION("ICMP_CONNECTION", "ICMP连接"),
    IGMP_CONNECTION("IGMP_CONNECTION", "IGMP连接"),
    // 传输层关系
    TCP_CONNECTION("TCP_CONNECTION", "TCP连接"),
    UDP_CONNECTION("UDP_CONNECTION", "UDP连接"),
    SCTP_CONNECTION("SCTP_CONNECTION", "SCTP连接"),
    // 会话层关系
    SESSION_ESTABLISHMENT("SESSION_ESTABLISHMENT", "会话建立"),
    SESSION_MANAGEMENT("SESSION_MANAGEMENT", "会话管理"),
    // 表示层关系
    ENCRYPTION("ENCRYPTION", "数据加密"),
    DECRYPTION("DECRYPTION", "数据解密"),
    // 应用层关系
    DSP_COMMUNICATION("DSP_COMMUNICATION", "VoIP呼叫的建立、管理和终止"),
    RDP_COMMUNICATION("RDP_COMMUNICATION", "RDP远程桌面链接和管理"),
    LDAP_COMMUNICATION("LDAP_COMMUNICATION", "LDAP通信"),
    SSH_COMMUNICATION("SSH_COMMUNICATION", "SSH通信"),
    TELNET_COMMUNICATION("TELNET_COMMUNICATION", "TELNET通信"),
    SNMP_COMMUNICATION("SNMP_COMMUNICATION", "SNMP通信"),
    HTTP_COMMUNICATION("HTTP_COMMUNICATION", "HTTP/HTTPS通信"),
    EMAIL_COMMUNICATION("EMAIL_COMMUNICATION", "邮件协议（SMTP/POP3/IMAP）通信"),
    FILE_TRANSFER("FILE_TRANSFER", "文件传输协议（FTP）通信"),
    DNS_QUERY("DNS_QUERY", "DNS查询"),
    // 网络安全关系
    FIREWALL_RULE("FIREWALL_RULE", "防火墙规则"),
    VPN_CONNECTION("VPN_CONNECTION", "VPN链接"),
    SECURITY_MONITORING("SECURITY_MONITORING", "入侵检测和防御系统（IDS/IPS）"),
    // 云计算和虚拟化关系
    VIRTUAL_CONNECTION("VIRTUAL_CONNECTION", "虚拟网络连接"),
    CONTAINER_CONNECTION("CONTAINER_CONNECTION", "容器网络连接"),
    CLOUD_SERVICE_CONNECTION("CLOUD_SERVICE_CONNECTION", "云服务连接"),
    // 其他
    CONTACT("CONTACT", "链接"),
    DEPLOY("DEPLOY", "安装"),
    INCLUDE("INCLUDE", "包含"),
    NETWORK("NETWORK", "网路关系"),
    // 默认
    RELATED_TO("RELATED_TO", "默认关系类型");
    private final String protocol;
    private final String description;
    @Override
    public String toString() {
        return this.name() + ":" + this.description;
    }
}
